package com.ray.controller;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ray.bean.DatatablesViewPageBean;
import com.ray.bean.ReportBean;
import com.ray.exception.ServiceException;
import com.ray.service.ApprovalService;
import com.ray.service.CompanyMaterialService;
import com.ray.service.ExpectDateService;
import com.ray.service.OrderService;
import com.ray.service.WorkshopService;
import com.ray.util.RequestUtil;
import com.ray.util.ResponseUtil;
import com.ray.util.ReturnStringUtil;

@Controller
@RequestMapping("/expectDate")
public class ExpectDatelController {
	

	@Autowired
	ExpectDateService  expectDateService;
	@Autowired
	CompanyMaterialService companyMaterialService;
	
	
	//获取订单完成日期
	@RequestMapping("/getExpectDate")
	@ResponseBody
	public Map getExpectDate(HttpServletRequest request) throws ServiceException, ParseException{
		Map map=RequestUtil.getRequestAllParam(request);
		return ResponseUtil.ResponseResult(expectDateService.getExpectDate(map));
	}
	
	//获取工序生产时间
	@RequestMapping("/getProcedureExpectDate")
	@ResponseBody
	public Map getProcedureExpectDate(HttpServletRequest request) throws ServiceException, ParseException{
		Map map=RequestUtil.getRequestAllParam(request);
		return ResponseUtil.ResponseResult(expectDateService.getProcedureExpectDate(map));
	}
	
	
//	//设置顺序
//	@RequestMapping("/setOrderSort")
//	@ResponseBody
//	public Map setOrderSort(HttpServletRequest request) throws ServiceException{
//		Map map=RequestUtil.getRequestAllParam(request);
//		expectDateService.setSort(map);
//		return ResponseUtil.ResponseResult("chenggong");
//	}
	
	
	
	
	

}
